<?php 
$cs=Yii::app()->clientScript;
$cs->registerScript('consignor_linkman_appointment_dialog_view',<<<END
$(document).bind('keydown',function(e){if(e.keyCode==27){parent.$.modal.close();}});
$("table.dataGrid tr:gt(0)").click(function(){
	\$parent=$(window.parent.document);
	\$parent.find("#goods_{$_GET['n']}_loading_place").val($(this).find("a:first").text()).removeClass('error').next('span').remove();
	\$parent.find("#goods_{$_GET['n']}_consignor_link_name").val($(this).find("a:eq(1)").text()).removeClass('error').next('span').remove();
	\$parent.find("#goods_{$_GET['n']}_consignor_link_tel").val($(this).find("a:eq(2)").text()).removeClass('error').next('span').remove();
	parent.$.modal.close();
	return false;
});
END
)
?>
<?php echo CHtml::beginForm(array($this->action->id));?>
<div style="padding-bottom:10px">
	装货地：<input type="text" name="keys[name]" size="7" value="<?php echo isset($_GET['keys']['name'])?$_GET['keys']['name']:'';?>"/>&nbsp;&nbsp;
	模糊查询：<input type="radio" name="keys[blur]" value="1" checked/>是  
	<input type="radio" name="keys[blur]" value="0" <?php echo isset($_GET['keys']['blur'])&&$_GET['keys']['blur']==0?'checked':'';?>/>否&nbsp;&nbsp;
	<input type="hidden" name="consignor_id" value="<?php echo $_GET['consignor_id'];?>">
	<input type="hidden" name="n" value="<?php echo $_GET['n'];?>">
	<input type="submit" value="搜索"/>
</div>
<?php echo CHtml::endForm();?>
<table class="dataGrid" width=80%>
  <tbody>
  	<tr><td align="center">装货地</td><td align="center">联系人</td><td align="center">联系人电话</td></tr>
<?php foreach($models as $n=>$model): ?>
	<tr>
	<td width="100px" align="center"><a href="#" ><?php echo $model->addr;?></a></td>
	<td align="center"><a href="#"><?php echo $model->name;?></a></td>
	<td width="200px" align="center"><a href="#"><?php echo $model->mobile_no;?></a></td>
	</tr>
<?php endforeach; ?>
  </tbody>
</table>
<br/>
<?php $this->widget('CLinkPager',array('pages'=>$pages,'maxButtonCount'=>Yii::app()->params['dialog'][$this->action->id]['maxButtonCount'])); ?>